package com.yy.pojo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * test_user
 * @author 
 */
@ApiModel(value="com.yy.TestUser")
@Data
@Accessors(chain = true)
@TableName("test_user")
@AllArgsConstructor
@NoArgsConstructor
public class TestUser implements Serializable {
    /**
     * 用户id
     */
    @ApiModelProperty(value="用户id")
    @ExcelIgnore
    private Integer id;

    /**
     * 用户姓名
     */
    @ApiModelProperty(value="用户姓名")
    @ExcelProperty(value = "用户名")
    private String name;

    /**
     * 性别（1为男，0为女）
     */
    @ApiModelProperty(value="性别（1为男，0为女）")
    @ExcelProperty(value = "性别")
    private Boolean sex;

    /**
     * 用户地址
     */
    @ApiModelProperty(value="用户地址")
    @ExcelProperty(value = "用户地址")
    private String address;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:dd")
    @ExcelProperty(value = "创建时间")
    private Date createTime;

    public TestUser(String name, String address) {
        this.name = name;
        this.address = address;
    }

    public TestUser(String name, Boolean sex, String address, Date createTime) {
        this.name = name;
        this.sex = sex;
        this.address = address;
        this.createTime = createTime;
    }

    public TestUser(Integer id) {
        this.id = id;
    }

    private static final long serialVersionUID = 1L;
}